modules := OpenRoleZooSeetaAuthorize TenniS FaceAntiSpoofingX6 \
        FaceBoxes FaceRecognizer6 FaceTracker6 Landmarker \
        PoseEstimator6 QualityAssessor3 SeetaAgePredictor \
        SeetaEyeStateDetector SeetaGenderPredictor SeetaMaskDetector

CRAFT_DIR := craft
LINUX_SCRIPT := build.linux.x64.sh

# 定义伪目标
.PHONY: linux $(modules)

# 默认目标：遍历所有目录并执行脚本
linux: $(modules)

# 为每个目录定义目标
$(modules):
	@if [ -f $@/$(CRAFT_DIR)/$(LINUX_SCRIPT) ]; then \
		echo "Running script: $@/$(CRAFT_DIR)/$(LINUX_SCRIPT)"; \
		bash $@/$(CRAFT_DIR)/$(LINUX_SCRIPT); \
	else \
		echo "Script not found: $@/$(CRAFT_DIR)/$(LINUX_SCRIPT)"; \
	fi
